using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using webapp4U.BOL;


namespace webapp4U.UI.Control
{
    public partial class Contact : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }
       
        protected void btDelete_Click(object sender, EventArgs e)
        {
            foreach (GridViewRow row in GridViewItem.Rows)
            {
                bool isChecked = ((CheckBox)row.FindControl("chkSelect")).Checked;
                if (isChecked)
                {
                    int ContactID = Convert.ToInt32(((CheckBox)row.FindControl("chkSelect")).ToolTip.Trim());
                    webapp4U.BOL.Contact.Delete(ContactID);
                }
            }
            GridViewItem.DataBind();
        }

    }
}